<div id="popupContactOpen"><div id=><h1>Players</h1></div></div>

<div id="popupContact">
<a id="popupContactClose">x</a>
<h1>Players</h1>
<p id="contactArea">
      Search for your player. <br />
</p>
<form action='' method=post name=form1>
    <br class="spacer"/>
    <p class="formstyle"><em>Player Search:</em>
        <input style="width:200px;" type="text" name="keyword" id="keyword" value=""/><input  class="button" type="submit" name="searchprocess" id="searchprocess" value="Search" />
    </p>
    <p class="formstyle"><em>Player Name(s):</em>
            <input style="width: 350px;" type="text" name="textfield" id="textfield" value=""/><BR/>
    </p>
    <p class="formstyle">Player max: <label id="player_max"> player(s)</label></p>
            <input type=hidden name= quantity value=quantity />
    <br class="spacer"/>
<h1>Search Result</h1>
<div style='max-height: 200px; overflow: auto;'>
<dl>
    <dt id="col_0" style="width: 40px ; height: 10px;">Select</dt>
    <dt id="col_1" style="width: 150px ;height: 10px;">Player Name</dt>
    <dt id="col_2" style="width: 240px ;height: 10px;">Full Name</dt>
    <dt id="col_3" style="width: 60px ; height: 10px;">Group</dt>
</dl>
<dl>
    <dd id="row_0_col_0">abccccccccccccccccccccccccccc</dd>
</dl>
<dl>
    <dd id="row_0_col_1">abc</dd>
</dl>
<dl>
    <dd id="row_0_col_2">abc</dd>
</dl>
<dl>
    <dd id="row_0_col_3">abc</dd>
</dl>

</div>
    <p class="center"><input class="button" type="submit" name="action3" id="action3" value="Submit" onclick=""/>
    <input class="button" type="button"  value="Clear" onClick="clearForms();" /></p>

</form>
</div>

<div id="backgroundPopup"></div>

<script type="text/javascript" language="javascript">
    build_table();
    function build_table(){
        var row_quantity= 1;
        var col_quantity = 4;

        //template
        var row_count = "i";
        var col_count = "j";
        var title = "col_j";
        var temp  = "row_i_col_j";

        //style
        var style_item_temp = "width,height";

        for (i = 0; i < row_quantity; i++){
            for (j = 0; j < col_quantity; j++){
                col = str_replace(col_count, j, title);
                col_style = ($("#"+col).attr( "style" ) );
                style_item=get_style(col_style, style_item_temp);
    //            alert(style_item);
                items = str_replace(col_count, j, temp);
                items = str_replace(row_count, i, items);
                $("#"+items).attr('style', style_item);
            }
        }
    }
    function get_style(style_in, style_needed){
        var style_array = "";
        var style_need_array = "";
        if(stristr(style_in,";")){
            style_array = split(";", style_in);
        }else{
            style_array = new Array();
            style_array[0] = style_in;
        }
        if(stristr(style_needed,",")){
            style_need_array = split(",", style_needed);
        }else{
            style_need_array = new Array();
            style_need_array[0] = style_needed;
        }
        var ii,jj;
        ret = "overflow: hidden";
        for(ii = 0; ii < style_array.length; ii++){
            if(style_array[i]!="" && style_array[ii]!=" " && style_array[ii]!=null){
                for(jj = 0; jj < style_need_array.length; jj++){
                    if(stristr(style_array[ii],style_need_array[jj])!==false){
                        if(ret==""){
                            ret += style_array[ii];
                        }else{
                            ret += ";"+style_array[ii];
                        }
                    }
                }
            }
        }
        return ret;
    }
</script>